home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Form / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.0 KB  |  123 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWPART_H
  20. #include "FWPart.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWRESFIL_H
  26. #include "FWResFil.h"
  27. #endif
  28.  
  29. // ----- Foundation Layer -----
  30.  
  31. #ifndef FWSTDDEF_H
  32. #include "FWStdDef.h"
  33. #endif
  34.  
  35. #ifndef FWBNDSTR_H
  36. #include "FWBndStr.h"
  37. #endif
  38.  
  39.  
  40. //========================================================================================
  41. // Forward Declarations
  42. //========================================================================================
  43.  
  44. class FW_CPart;
  45. class FW_CString;
  46. class FW_CMenuBar;
  47. class FW_CMenuEvent;
  48. class FW_CPresentation;
  49. class FW_CPictureShape;
  50.  
  51. //========================================================================================
  52. // CFormPart
  53. //========================================================================================
  54.  
  55. class CFormPart : public FW_CPart
  56. {
  57. //----------------------------------------------------------------------------------------
  58. //    Initialization/Destruction
  59. //
  60. public:
  61.     
  62.     FW_DECLARE_AUTO(CFormPart)
  63.     
  64.     CFormPart(ODPart* odPart);
  65.     virtual ~CFormPart();
  66.  
  67.     virtual void Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);    // Override
  68.  
  69. //----------------------------------------------------------------------------------------
  70. //    Inherited API
  71. //
  72. public:
  73.     virtual FW_CFrame*            NewFrame(Environment* ev,
  74.                                          ODFrame* odFrame,
  75.                                          FW_CPresentation* presentation,
  76.                                          FW_Boolean fromStorage);
  77.  
  78.     virtual FW_Handled            DoAdjustMenus(Environment* ev,
  79.                                          FW_CMenuBar* menuBar, 
  80.                                           FW_Boolean hasMenuFocus,
  81.                                           FW_Boolean isRoot);
  82.  
  83.     virtual FW_Handled            DoMenu(Environment* ev,
  84.                                            const FW_CMenuEvent& theMenuEvent);
  85.  
  86.     virtual FW_Handled    DoAbout(Environment* ev);
  87.     virtual FW_CContent*        NewPartContent(Environment* ev);
  88.  
  89. //----------------------------------------------------------------------------------------
  90. //    New API
  91. //
  92. public:
  93.     FW_CPresentation*     GetPwdDialogPresentation();
  94.     
  95.     void                 DoFormCommand(Environment* ev);
  96.  
  97.     void                 GetResourceString(Environment* ev,
  98.                                              FW_ResourceID multiStringID,
  99.                                              FW_ResourceID stringID,
  100.                                              FW_CString& string);
  101.     
  102. //----------------------------------------------------------------------------------------
  103. //    Data Members
  104. //
  105. private:
  106.     FW_CString255            fTextData;
  107.     FW_Boolean                fIsForm;
  108.  
  109.     FW_CPresentation*        fMainPresentation;
  110.     FW_CPresentation*        fPwdDialogPresentation;
  111. };
  112.  
  113. //==============================================================================
  114. // CFormPart Inlines
  115. //==============================================================================
  116.  
  117. inline FW_CPresentation* CFormPart::GetPwdDialogPresentation()
  118. {
  119.     return fPwdDialogPresentation;
  120. }
  121.  
  122. #endif
  123.